<?php
session_start();
$title="แก้ไขผู้ใช้";
include ('header-admin.php');

$userID=$_SESSION["HBD_USER"];

$cid=$_GET["id"];

mysql_query('SET NAMES utf8');

//fetch userdata
$sql="select * from `customer` WHERE id = '$cid'";
$result = mysql_query($sql);
$rs = mysql_fetch_array($result);
$customer_id = $rs['customer_id'];
$customer_name = $rs['customer_name'];
$customer_surname = $rs['customer_surname'];
$customer_address = $rs['customer_address'];
$customer_email = $rs['customer_email'];
$customer_tel = $rs['customer_tel'];
$customer_fax = $rs['customer_fax'];
?>

<div id="center-block" class="main-content">
<img src="img/customer_icon.png"/ id="img-block-content">
<div id="content-title-right">
		<h2 class="caption-header">แก้ไขลูกค้า</h2>
		<span class="caption">แก้ไขข้อมูลลูกค้า หาดบ้านดินรีสอร์ท</span>
	</div>

	<hr><br><br><br><br><br>
			<div id="center-block-right">
				<form action="doEditCustomer.php?id=<?=$cid?>" method="POST" id="booking-form">
				
				<table>
					<tr>
						<td><label for="customer_name">ชื่อ-นามสกุล   ผู้จอง</label></td>
						<td><input type="text" id="customer_name" name="customer_name" value="<?=$customer_name?>" size="30" class="validate[required] text-input"/></td>
						<td><input type="text" id="customer_surname" name="customer_surname" value="<?=$customer_surname?>" size="30" class="validate[required] text-input"/></td>
					</tr>
					<tr>
						<td><label for="customer_id">รหัสบัตรประชาชน</label></td>
						<td><input type="text" id="customer_id" name="customer_id" value="<?=$customer_id?>" size="30" /></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="customer_address">ที่อยู่</label></td>
						<td colspan="2"><textarea name="customer_address" cols="50" rows="3" class="" id="customer_address"><?=$customer_address?></textarea></td>
<!--						<td></td>-->
					</tr>
					<tr>
						<td><label for="customer_email">E-Mail</label></td>
						<td><input type="text" id="customer_email" name="customer_email" value="<?=$customer_email?>" size="30" class="validate[required,custom[email]] text-input" /></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="customer_tel">เบอร์โทรศัพท์</label></td>
						<td><input type="text" id="customer_tel" name="customer_tel" value="<?=$customer_tel?>" size="30" class="validate[required,custom[telephone]] text-input" /></td>
						<td></td>
					</tr>
					<tr>
						<td><label for="customer_fax">Fax</label></td>
						<td><input type="text" id="customer_fax" name="customer_fax" value="<?=$customer_fax?>" size="30" class="" /></td>
						<td></td>
					</tr>
					<tr>
						<td></td>
						<td><p class="submit"><input type="submit" value="เรียบร้อย" /></p></td>
						<td></td>
					</tr>
				</table>
				
				<!--<p><label for="customer_name">ชื่อ-นามสกุล   ผู้จอง</label> <input type="text" id="customer_name" name="customer_name" value="<?=$customer_name?>" size="30" class="validate[required] text-input"/> 
				<input type="text" id="customer_surname" name="customer_surname" value="<?=$customer_surname?>" size="30" class="validate[required] text-input"/></p>
				<p><label for="customer_id">รหัสบัตรประชาชน</label> <input type="text" id="customer_id" name="customer_id" value="<?=$customer_id?>" size="30" /></p>
				<p><label for="customer_address">ที่อยู่</label>
                  <textarea name="customer_address" cols="50" rows="3" class="" id="customer_address"><?=$customer_address?></textarea>
				</p>
				<p><label for="customer_email">E-Mail</label> <input type="text" id="customer_email" name="customer_email" value="<?=$customer_email?>" size="30" class="validate[required,custom[email]] text-input" /></p>
				<p><label for="customer_tel">เบอร์โทรศัพท์</label> <input type="text" id="customer_tel" name="customer_tel" value="<?=$customer_tel?>" size="30" class="validate[required,custom[telephone]] text-input" /></p>
				<p><label for="customer_fax">Fax</label> <input type="text" id="customer_fax" name="customer_fax" value="<?=$customer_fax?>" size="30" class="" /></p>
				<p class="submit"><input type="submit" value="เรียบร้อย" /></p>
				
				-->
				</form>
				<br><br>
			</div>
	</div>

<?
include ('footer.php');
?>